import http from '@/utils/httpUtils'

/**
 * @查询角色列表
 */
export function getRoleList(query){
    return http('/system/role/roleList','get',query);
}

/**
 * @新增角色
 */
export function addRole(query){
    return http('/system/role/insertRole','post',query);
}

/**
 * @删除角色
 */
export function deleteRole(query){
    return http(`/system/role/deleteRoles/${query}`,'delete');
}


/**
 * @角色ID查询角色信息
 */
export function getRoleInfo(id){
    return http(`/system/role/roleInfo/${id}`,'get');
}

/**
 * @修改角色
 */
export function updateRole(query){
    return http('/system/role/updateRole','post',query);
}

/**
 * @角色是否可用
 */
export function roleIsEnable(roleId,isEnable){
    return http(`/system/role/roleIsEnable/${roleId}/${isEnable}`,'put');
}